package Cani;
//goleste cana 1 in cana 2
public class T12 extends Operator{
	public boolean condition(Nod n){
		if((n.getX()>0)&&(n.getY()<getMaxCapacityC2()))
			return true;
		else return false;
	}
	public int min(int a,int b){
		int min=a;
		if(min>b)
			min=b;
		return min;
	}
	public Nod action(Nod n){
		Nod clone=new Nod(n);
		clone.setX(n.x-min(n.x,getMaxCapacityC2()-n.y));
		clone.setY(n.y+min(n.x,getMaxCapacityC2()-n.y));
		return clone;
	}
	
}
